public class Test5 {
    public static void main(String[] args) {
//        5.统计100~1000之间的回文数个数
        int count = 0;
        for(int i =100; i <= 1000; i++){
            int num = 0;
            int copy = i;
            while (copy > 0){
                int ge = copy % 10;
                num = num * 10 + ge;
                copy /= 10;
            }
            if(num == i){
                count++;
            }
        }
        System.out.println("100~1000之间的回文数个数有"+count+"个");
    }
}
